Skip to main content

Setup Firebase Cloud Messaging

Here you will learn how to get your FCM key or JSON file to receive Push Notifications in your application.

  • Requirements
    • An Android Application with the Android SDK set with GroupLink.setFirebaseToken();
    • Firebase Account

Creating a Firebase Project

To enable Push Notifications in your application, start by creating a project in your Firebase console. This project will serve as the hub for managing your application on the Android Platform.

Firebase Console

Firebase Console Project List Page

Setting up Firebase Cloud Messaging

After creating your project, proceed to configure Firebase Cloud Messaging. When setting it up, you'll encounter two options: Firebase Cloud Messaging API (V1) and the legacy API Cloud Messaging. While both options function within our platform, we strongly recommend opting for the Firebase Cloud Messaging API (V1) for its enhanced security and alignment with Google's latest standards for handling Push Notifications.

To begin, access the settings of your project.

Firebase Dashboard

Project Dashboard Screen

Following that, navigate to the Cloud Messaging tab in the top bar. Here, you'll find your application's Sender ID, which you'll use to upload and receive Push Notifications effectively.

Firebase Cloud Messaging

Cloud Messaging Tab Dashboard

The Sender ID, indicated by the number in the blue square, is crucial for receiving Push Notifications. Remember to store this ID as you'll need it to input into the Group Link Dashboard to ensure the proper reception of Push Notifications.

Next, obtain the Private Key JSON file, which serves as the Push configuration for your application. You can acquire this file by navigating to "Service Accounts" in the top bar of your project settings.

Firebase Service Accounts

Service Accounts Tab

Click on "Generate a new Private Key" and confirm. This action will initiate the download of a JSON file. Make sure to store this file safely, as you'll need it later to upload it in the Group Link Dashboard.

The final essential item is your application's Package Name. You can obtain this by opening your Android Project's AndroidManifest.xml file, as illustrated in the image below.

AndroidManifest.xml

Android Studio with AndroidManifest.xml file

The subsequent step involves configuring your Android Application within the Group Link Dashboard.